
env = Environment()
env[ 'CCFLAGS' ] = '-g -fPIC -D_THREAD_SAFE -pthread'
env[ 'CPPPATH' ] = [ '../include', '../../include', '../../../include', '/home/s/include', ]
env[ 'CPPFLAGS' ] = []
env[ 'LIBDIR' ] = '../../lib'
env[ 'LIBPATH' ] = [ '/home/s/lib/static', '/usr/lib']
env[ 'LIBS' ] = ['boost_filesystem-mt', 'boost_system-mt', 'boost_thread-mt','pthread',]

libdir = '../../lib'
incdir = '../../include'

# static library
libfile = env.StaticLibrary('fecab-client', ['client.cpp', 'broker.cpp'])
libfilename = str(libfile[0])

env.Command( '../lib/%s' % libfilename, libfilename, Copy("$TARGET","$SOURCE") )
env.Command( '%s/%s' % (libdir, libfilename), libfilename, Copy("$TARGET","$SOURCE") )

static_lib_filename = libfilename

# shared library
##libfile = env.SharedLibrary('fecab-client', [static_lib_filename, ])
#libfile = env.SharedLibrary('fecab-client', ['client.cpp', 'broker.cpp'])
#libfilename = str(libfile[0])
#env.Command( '%s/%s' % (libdir, libfilename), libfilename, Copy("$TARGET","$SOURCE") )


# header file
head_filename = 'client.hpp'
env.Command( '%s/fecab/%s' % (incdir, head_filename), head_filename, Copy("$TARGET","$SOURCE") )


